As a rate of a high-speed communication link continuously increases, various damage effects of a channel are gradually strengthened, which causes a signal-to-noise ratio to decrease. To improve bit error performance in the case of a low signal-to-noise ratio, a forward error correction (FEC) technology has gradually become a mandatory technology during a process of implementing a high-speed communication link. Among numerous FEC codes, a Reed Solomon (RS) code and a Bose-Chaudhuri-Hocquenghem (BCH) code are widely applied due to advantages such as a high gain, easy implementation, and a small quantity of occupied resources. The RS code has been adopted by G.709 of the International Telecommunication Union-Telecommunication Standardization Sector (ITU-T) and 802.3bj of the Institute of Electrical and Electronic Engineers (IEEE). The BCH code is a popular option of an FEC code in a current 400 G Ethernet standard draft. In addition, application of the RS code and the BCH code is also important in a high-speed backplane/copper cable link at a rate of 25 Gbps or higher.
During processes of encoding and decoding an RS code and a BCH code, a data frame is used as a to-be-processed unit. On a receive side, an FEC frame boundary in a data stream first needs to be determined before decoding. In the prior art, there are two common methods for determining an FEC frame boundary. One method is that on a transmit side, special alignment markers are periodically added to a data stream, and on a receive side, an FEC frame boundary is determined by using these alignment markers. This method increases redundant information, consumes more circuit resources, and increases a bit rate. In addition, to control redundant information within a particular range, a time interval between two inserted alignment markers needs to be increased, which means that determining an FEC frame boundary needs to consume more time.
The other method is that a logic circuit on a receive side searches a data stream for an FEC frame by using a property of an FEC code, to implement determining of an FEC frame boundary. As shown in FIG. 1, in this method, it is first assumed that a first data block is an FEC frame. A starting location of the first data block is a first symbol (each symbol includes one bit), and a length of the first data block is equal to a length of one FEC frame. On the receive side, the first data block is sent to a decoder, and whether a property of the first data block accords with a property of an FEC frame is analyzed. If the property of the first data block accords with the property of the FEC frame, it is determined that the first symbol is an FEC frame boundary. If the property of the first data block does not accord with the property of the FEC frame, whether a property of a second data block accords with the property of the FEC frame is further analyzed. A starting location of the second data block is a second symbol, and an offset of the second symbol relative to the first symbol is N+1 symbols, where N is a quantity of symbols included in one FEC frame. During an actual operation process, it may be necessary to discard the second data block and determine whether a third symbol is an FEC frame boundary. The third symbol is a starting location of a third data block. An offset of the third symbol relative to the second symbol is N symbols. In a worst case of this method, N data blocks need to be checked, and data of a two-frame length needs to be received at each time of check. Therefore, in the worst case, data of 2×N×N symbols needs to be received, and therefore, a process of determining an FEC frame boundary consumes a relatively long time, and efficiency is relatively low.
The present embodiments provide a method for determining a frame boundary that is applicable to a communication link on which RS and BCH FEC codes are adopted, which can significantly improve efficiency in determining an FEC frame boundary.